package com.es.controller;

import com.es.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("position")
public class PositionController {

    @Autowired
    private PositionService positionService;

    @GetMapping("importAll")
    public String importAll() {
        return positionService.importAll();
    }


    @PostMapping("search")
    public Map<String, Object> search(String key) {
        return positionService.search(key);
    }


}
